﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MusicManager.ascx.cs" Inherits="Web.Cms.MusicManager.MusicManager" %>
 <script type="text/javascript">
     $(document).ready(function () {
         $("#<%=txtKeysearch.ClientID%>").autocomplete('/Layout/AutoComplateSearch/TimTheoTenBaiHat.ashx');
     });       
</script>
<script type="text/javascript">
    $(function () {
        $("#<%=txtDatefrom.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
        $("#<%=txtDateTo.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
    });
</script>
<div id="uc_CMSContents">
<div class="fl">
     <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/MusicManager/CreateEditMusic.aspx','QUẢN LÝ NHẠC',750,500,null,__doPostBack)">
        <img src="/App_Themes/Default/Images/Add_b.gif" border="0" />
    </a>  
</div>
<div style="padding-bottom: 20px;" class="fl">
<p class="heading"><asp:Label runat="server" ID="lbHeader"></asp:Label></p>        
</div>
<div class="clear8px"></div>
<div>    
    <div style="float:left;padding-right:10px;"><b>Tên bài hát  hoặc mã số:</b> <asp:TextBox runat="server" ID="txtKeysearch" Height="18" Width="225"></asp:TextBox></div>        
    <div style="float:left;padding-right:10px;padding-left:50px;"><b>Ca sỹ:</b> <asp:DropDownList runat="server" ID="dropSingerId" Height="20px" Width="230"></asp:DropDownList></div>    
    <div style="float:left;padding-right:10px;display:none;"><b>Album:</b> <asp:DropDownList runat="server" ID="dropGroupMusicId" Height="20px" Width="230"></asp:DropDownList></div>
    <div style="float:left;padding-right:10px;"><b>Một số lựa chọn:</b> 
        <asp:DropDownList runat="server" ID="dropType" Height="20px" Width="150">
            <asp:ListItem Value="">--------------</asp:ListItem>
            <asp:ListItem Value="1">Nhạc hot nhất</asp:ListItem>
            <asp:ListItem Value="2">Nhạc mới nhất</asp:ListItem>
            <asp:ListItem Value="4">Viettel</asp:ListItem>
            <asp:ListItem Value="8">Vinaphone</asp:ListItem>
            <asp:ListItem Value="16">Mobifone</asp:ListItem>
            <asp:ListItem Value="32">Vietnamobile</asp:ListItem>
            <asp:ListItem Value="64">EVNtelecom</asp:ListItem>
            <asp:ListItem Value="128">Sfone</asp:ListItem>
            <asp:ListItem Value="256">Beeline</asp:ListItem>
        </asp:DropDownList>
    </div>
    <div style="clear:both;padding-top:5px;"></div>
    <div style="float:left;padding-right:20px;padding-left:88px;"><b>Tác giả:</b> <asp:DropDownList runat="server" ID="dropMusicianId" Height="20px" Width="230"></asp:DropDownList></div>    
    <div style="float:left;padding-right:10px;"><b>Chuyên mục:</b> <asp:DropDownList runat="server" ID="DropZone" Height="20px" Width="230"></asp:DropDownList></div>            
    <div style="clear:both;padding-top:5px;"></div>
    <div style="float:left;padding-right:10px;padding-left:10px;"><b>Ngày từ(mm/dd/yyyy): </b> <asp:textbox CssClass="input-txt" id="txtDatefrom" runat="server" Height="18px" Width="150"></asp:textbox></div>        
    <div style="float:left;padding-right:10px;padding-left:112px;"><b>Đến:</b> <asp:textbox CssClass="input-txt" id="txtDateTo" runat="server" Height="18px" Width="150"></asp:textbox></div>    
    <div style="float:left;padding-right:10px;padding-left:20px;"><asp:Button runat="server" ID="btnTimKiem" CssClass="Button_Search" onclick="btnTimKiem_Click"/></div>
</div>
<br />
<div style="clear:both;"><asp:Label Font-Bold="true" ForeColor="red" Font-Size="11px" ID="lblMessage" runat="server"></asp:Label></div>

<br />

<asp:GridView ID="grdMusicManager" runat="server" BackColor="#ffffff" AutoGenerateColumns="false"
 OnRowCommand="grdMusicManager_RowCommand" Width="100%" BorderColor="Gainsboro"
	BorderStyle="solid" BorderWidth="1px" CellPadding="4" CellSpacing="0" CssClass="Grid" AllowPaging="false">
	<AlternatingRowStyle CssClass="labe_content_02" />
	<RowStyle CssClass="labe_content_01" />
	<HeaderStyle CssClass="labe_Caption" Font-Bold="True" HorizontalAlign="Center" />
    <Columns>               
         <asp:BoundField HeaderText="STT">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle HorizontalAlign="Center" />            
            <ItemStyle />
        </asp:BoundField>  
        <asp:TemplateField  HeaderText="Mã Code">      
            <ItemStyle HorizontalAlign="Center" Width="100px" />      
            <ItemTemplate><asp:Label runat="server" ID="lbCodId"></asp:Label></ItemTemplate>
        </asp:TemplateField>                 
        <asp:TemplateField  HeaderText="Tên bài hát">            
            <ItemTemplate><%#Eval("MucsicName")%></ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField  HeaderText="Ca sỹ thể hiện">            
            <ItemTemplate><%#Eval("SingerName")%></ItemTemplate>
        </asp:TemplateField>
        
        <asp:BoundField HeaderText="Giá" DataField="Price" HeaderStyle-Width="120">
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="center" />            
        </asp:BoundField>   
        <asp:BoundField HeaderText="Người tạo mới" DataField="CreatedBy" HeaderStyle-Width="100">
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="center" />            
        </asp:BoundField>  
        <asp:TemplateField HeaderText="nghe thử" HeaderStyle-Width="60">
            <ItemStyle HorizontalAlign="Center" /> 
            <ItemTemplate>                                                
                <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/MusicManager/PlayVideo.aspx?musicManageId=<%# Eval("MusicManageId") %>','Bạn đang nghe bài <%#Eval("MucsicName") %>',400,150,null,__doPostBack)">
                    <img src="/App_Themes/Default/Images/Buttons/views.gif" border="0">
                </a>
            </ItemTemplate>
        </asp:TemplateField>                                    
        <asp:TemplateField HeaderText="Sửa" HeaderStyle-Width="20">
            <ItemTemplate>                                                
                <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/MusicManager/CreateEditMusic.aspx?musicManageId=<%# Eval("MusicManageId") %>','<%#Eval("MucsicName") %>',780,500,null,__doPostBack)"><img src="../App_Themes/Default/Images/edit.gif" border="0"></a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderStyle-Width="30" HeaderText="Status">
            <ItemTemplate>                             
                <asp:ImageButton ID="btnStatus" runat="server" CommandArgument='<%# Eval("MusicManageId") %>' CommandName="CommandStatus" />   
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Xóa" HeaderStyle-Width="20">
            <ItemTemplate>             
                <asp:Button ID="btnDelete" runat="server" CssClass="Icon_Delete" CommandArgument='<%# Eval("MusicManageId") %>' CommandName="Commanddelete" OnClientClick="return confirm('Bạn có chắc chắn xóa không ?')" />                   
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField  HeaderText="Check File" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="60">            
            <ItemStyle HorizontalAlign="Center" />
            <ItemTemplate><asp:Label runat="server" ID="lbCheckFile" ForeColor="Red"></asp:Label></ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<p style="text-align:center;">
    <br />            
    <asp:Label runat="server" ID="lbTotal" Font-Bold="true" Font-Size="15px" ForeColor="red"></asp:Label>            
    <br />  <br />
    <asp:Literal runat="server" ID="ltlPhanTrang"></asp:Literal>
    <br />
    <br />
</p>
</div>